import type { RouteRecordRaw } from "vue-router";
const routes: RouteRecordRaw[] = [
    {
        path: '/',
        name: 'Home',
        component: () => import('@/layouts/DefaultLayout.vue'),
        redirect: '/dashboard',
        children: [
            {
                path: '/dashboard',
                name: 'dashboard',
                component: () => import('@/views/dashboard/Dashboard.vue')
            },
            {
                path: '/chargingstation/monitor',
                name: 'monitor',
                component: () => import('@/views/chargingstation/Monitor.vue')
            },
            {
                path: '/chargingstation/revenue',
                name: 'revenue',
                component: () => import('@/views/chargingstation/Revenue.vue')
            },
            {
                path: '/chargingstation/fault',
                name: 'fault',
                component: () => import('@/views/chargingstation/Fault.vue')
            },
            {
                path: '/map',
                name: 'map',
                component: () => import('@/views/map/Map.vue')
            },
            {
                path: '/operations/orders',
                name: 'orders',
                component: () => import('@/views/operations/Orders.vue'),
                meta: {
                    keepAlive: true
                }
            },
            {
                path: '/operations/detail',
                name: 'detail',
                component: () => import('@/views/operations/Detail.vue'),

            },
            {
                path: '/operations/total',
                name: 'total',
                component: () => import('@/views/operations/Total.vue')
            },
            {
                path: '/alarm',
                name: 'alarm',
                component: () => import('@/views/alarm/Alarm.vue')
            },
            {
                path: '/equipment',
                name: 'equipment',
                component: () => import('@/views/Myequipment/MyEquipment.vue')
            },
            {
                path: '/document',
                name: 'document',
                component: () => import('@/views/document/Document.vue'),
                meta: {
                    needAuth: ['uadmi']
                }
            },
            {
                path: '/system',
                name: 'system',
                component: () => import('@/views/system/System.vue'),
                meta: {
                    needAuth: ["uadmi"]
                }
            },
            {
                path: '/personal',
                name: 'personal',
                component: () => import('@/views/personal/Personal.vue')
            },
            {
                path: '/recharge',
                name: 'recharge',
                component: () => import('@/views/recharge/Recharge.vue')
            },
            {
                path: '/normalgift',
                name: 'normalgift',
                component: () => import('@/views/gift/Gift.vue')
            },
            {
                path: '/membergift',
                name: 'membergift',
                component: () => import('@/views/gift/Gift.vue')
            }

        ]
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('@/views/Login.vue')
    },
    {
        path: "/:pathMatch(.*)*",
        name: 'NotFound',
        component: () => import('@/views/NotFound.vue')
    }
]

export default routes